package tjs.study.notes.dotest.zookper.locker.mini;

import org.I0Itec.zkclient.ZkClient;
import tjs.study.notes.dotest.zookper.locker.common.RLock;
import tjs.study.notes.dotest.zookper.locker.common.RLockFactory;

/**
 * Created by Nicky.Tang on 2021/11/9 8:53 下午
 *
 * @since 02.12.10
 */
public class RLockMiniFactory implements RLockFactory {
    private ZkClient zkClient;

    public RLockMiniFactory(ZkClient zkClient) {
        this.zkClient = zkClient;
    }

    public RLock getLock(String key) {
        RLockMiniZP rLockMiniZP = new RLockMiniZP(key, this.zkClient);
        return rLockMiniZP;
    }

}
